// import Mock from 'mockjs'
// import { param2Obj } from '@/utils/util'

const nowUserKey = '15110288389'

const userInfoMap = {
  15110288389: {
    code: 0,
    message: 'success',
    data: {
      id: 224,
      name: '叶真志',
      mobile: '15110288389',
      dob: null,
      yod: 4,
      sex: 0,
      serviceType: 'fleet',
      weixinId: null,
      lspId: 6,
      lspName: '测试承运商',
      fleetId: null,
      status: 1,
      authStatus: 1,
      licenseId: '440204199104284722',
      idCardKey: 'FqXZNv__V1G94Xo6cIBTJyx7TWff',
      idCardAttachName: 'mmexport1532661136254.jpg',
      withIdCardKey: 'FtD1X41xUvLfC5g8HxVMRES92tpL',
      withIdCardAttachName: '手持身份证.jpeg',
      reverseIdCardKey: 'FtD1X41xUvLfC5g8HxVMRES92tpL',
      reverseIdCardAttachName: '手持身份证.jpeg',
      driverLicenseId: '440204199104284722',
      drivingLicenseType: 'C1',
      driverLicenseFirstDate: 1397692800000,
      driverLicenseStartDate: 1397692800000,
      driverLicenseEndDate: 1587081600000,
      driverLicenseKey: 'FvwpSP7qvdjyrshIzjaQ9w90UpDn',
      driverLicenseAttachName: '驾驶证4.jpg',
      operatingLicenseKey: 'Fq1GITy4gulUvbALB6Nv4Z8g3SxS',
      operatingLicenseAttachName: 'E1387E21-785B-41CA-AAEB-BFDF90578DA9.jpeg',
      idCardPath: 'https://qiniu.lisa-test.unlcn.com/FqXZNv__V1G94Xo6cIBTJyx7TWff?imageView2/0/w/160/h/105&e=1533284501&token=wQknukoe-lwcjLKEnsBz-BrL61M1BEMP0Gq_M2qP:cDAtOz1fKhkvlNsvH66_ag6Uhbk=',
      withIdCardPath: 'https://qiniu.lisa-test.unlcn.com/FtD1X41xUvLfC5g8HxVMRES92tpL?imageView2/0/w/160/h/105&e=1533284501&token=wQknukoe-lwcjLKEnsBz-BrL61M1BEMP0Gq_M2qP:20fJgE_T6ANL6OH_JT0ok4pCeLY=',
      reverseIdCardPath: 'https://qiniu.lisa-test.unlcn.com/FtD1X41xUvLfC5g8HxVMRES92tpL?imageView2/0/w/160/h/105&e=1533284501&token=wQknukoe-lwcjLKEnsBz-BrL61M1BEMP0Gq_M2qP:20fJgE_T6ANL6OH_JT0ok4pCeLY=',
      driverLicensePath: 'https://qiniu.lisa-test.unlcn.com/FvwpSP7qvdjyrshIzjaQ9w90UpDn?imageView2/0/w/160/h/105&e=1533284501&token=wQknukoe-lwcjLKEnsBz-BrL61M1BEMP0Gq_M2qP:t5hY8-mPMZROxqpeT0PIE7MIxvw=',
      operatingLicensePath: 'https://qiniu.lisa-test.unlcn.com/Fq1GITy4gulUvbALB6Nv4Z8g3SxS?imageView2/0/w/160/h/105&e=1533284501&token=wQknukoe-lwcjLKEnsBz-BrL61M1BEMP0Gq_M2qP:y1XfaokjG2l60yetOGLS2BihOnM='
    }
  }
}

const InfoIsFillMap = {
  15110288389: {
    code: 0,
    message: 'success',
    data: {
      driverInfoStatus: true,
      vehicleInfoStatus: true,
      noCheckinReason: [],
      canCheckin: true
    }
  }
}

const originCityMap = {
  15110288389: {
    code: 0,
    message: 'success',
    data: [{
      province: '山东省',
      city: '济南市'
    }, {
      province: '广西壮族自治区',
      city: '南宁市'
    }, {
      province: '江西省',
      city: '南昌市'
    }]
  }
}

export default {
  getDriver: config => { // 获取司机信息
    // console.log('mock-account-getDriver()-config', config)
    const resData = userInfoMap[nowUserKey]
    console.log('mock-account-getDriver()-resData', resData)
    return resData
  },
  getInfoIsFill: config => { // 获取司机认证状态
    // console.log('mock-account-getInfoIsFill()-config', config)
    const resData = InfoIsFillMap[nowUserKey]
    console.log('mock-account-getInfoIsFill()-resData', resData)
    return resData
  },
  getOriginCity: config => { // 起运地 查询城市（中联业务范围）
    // console.log('mock-account-getOriginCity()-config', config)
    const resData = originCityMap[nowUserKey]
    console.log('mock-account-getOriginCity()-resData', resData)
    return resData
  }
}
